using System.Runtime.CompilerServices;

namespace ns2
{
	internal class StateInfo
	{
		public  StateEnum Type { get; }

		public string ExePath { get; }

		public string RelaunchFile { get; }

		public string ErrorMessage { get; }

		private StateInfo(StateEnum type, string exePath, string relaunchFile, string errorMessage)
		{
			Type = type;
			ExePath = exePath;
			RelaunchFile = relaunchFile;
			ErrorMessage = errorMessage;
		}

		public static StateInfo Success(string exePath)
		{
			return new StateInfo(StateEnum.Success, exePath, null, null);
		}

		public static StateInfo Relaunch(string relaunchFile)
		{
			return new StateInfo(StateEnum.Relaunch, null, relaunchFile, null);
		}

		public static StateInfo Error(string errorMessage)
		{
			return new StateInfo(StateEnum.Error, null, null, errorMessage);
		}
	}
}
